<?php 
include_once __DIR__."/AutoLoad.php";
class Tool{
    public static $objects=array();
    public static  function getObject($classname,$params=null){
        if(!isset(self::$objects["{$classname}"])  ){
            if($params===null){
                $object=$classname::getInstance();
            }else{
                $object=$classname::getInstance($params);
            }
            self::$objects["{$classname}"]=$object;
        }
        return self::$objects["$classname"];
    }
}